<template>
	<view class="map">
		<canvas-drag ref="canvasRef" id="canvas-drag" :graph="graph" width="100%" height="50%" enableUndo="true">
		</canvas-drag>
	</view>
</template>

<script>
	import canvasDrag from "@/components/canvas-drag/index";
	// calc(100% - 249rpx - env(safe-area-inset-bottom));
	export default {
		data() {
			return {
				graph: {
					w: 500,
					h: 400,
					type: 'image',
					sourceId: 'pgmImg',
					url: require('@/static/demo.jpg')
				},
				canvasBg: ""
			};
		},
		components: {
			canvasDrag
		}
	};
</script>
<style>
	@import "./index.css";

	.map {
		height: 100vh;
		width: 100vw;
	}
</style>
v
